// templateArr/业务处理 传formid
export const transactionFormId = {
    contSign: 'cont_sign',
    contChange: 'cont_change',
    contExtend: 'cont_extend',
    contRelease: 'cont_release',
    contFinish: 'cont_finish',
    agreeSign: 'agree_sign',
    agreeChange: 'agree_change',
    agreeRelease: 'agree_release',
    agreeFinish: 'agree_finish'
};

export const contFormTypeMap = {
    '1': {mainArea: 'cont_sign_dataCard', areas: ['dataCard']},
    '2': {
        mainArea: 'cont_extend_dataBase',
        areas: ['dataBase', 'dataBefore', 'dataAfter']
    },
    '3': {
        mainArea: 'cont_change_dataBase',
        areas: ['dataBase', 'dataBefore', 'dataAfter']
    },
    '4': {mainArea: 'cont_release_card', areas: ['dataCard']},
    '5': {mainArea: 'cont_finish_card', areas: ['dataCard']},
};

/**"签订":"1" "变更":"3" "解除":"4" "终止":"5"
 * "岗位协议":"postcont" "保密协议":"secrerycont" "培训协议":"traincont"
 */
export const agreeFormTypeMap = {
    '1': {
        'postcont': {mainArea: 'agree_sign_postcont', areas: ['postcontCard']},
        'secrerycont': {mainArea: 'agree_sign_secrerycont', areas: ['secrerycontCard']},
        'traincont': {
            mainArea: 'agree_sign_traincont',
            areas: ['traincontCard', 'traincontAgreeInfo', 'traincontTrainInfo', 'traincontBusinessInfo']
        }
    },
    '3': {
        'postcont': {
            mainArea: 'agree_change_postcont',
            areas: ['agreementCard', 'postcontCardBefore', 'postcontCardAfter']
        },
        'secrerycont': {
            mainArea: 'agree_change_secrerycont',
            areas: ['agreementCard', 'secrerycontCardBefore', 'secrerycontCardAfter']
        },
        'traincont': {
            mainArea: 'agree_change_traincont',
            areas: ['agreementCard', 'traincontCardBefore', 'traincontCardAfter']
        }
    },
    '4': {
        'postcont': {mainArea: 'agree_release_postcont', areas: ['postcontCard']},
        'secrerycont': {mainArea: 'agree_release_secrerycont', areas: ['secrerycontCard']},
        'traincont': {mainArea: 'agree_release_traincont', areas: ['traincontCard']}
    },
    '5': {
        'postcont': {mainArea: 'agree_finish_postcont', areas: ['postcontCard']},
        'secrerycont': {mainArea: 'agree_finish_secrerycont', areas: ['secrerycontCard']},
        'traincont': {mainArea: 'agree_finish_traincont', areas: ['traincontCard']}
    },
};

/**"签订":"1" "变更":"3" "解除":"4" "终止":"5" */
export const custFormToServer = {
    '1': {
        pageCode: '60110501p',
        appCode: '60110501'
    },
    '3': {
        pageCode: '60110503p',
        appCode: '60110503'
    },
    '4': {
        pageCode: '60110505p',
        appCode: '60110505'
    },
    '5': {
        pageCode: '60110507p',
        appCode: '60110507'
    }
};

export const formToServer = {
    cont_sign_dataCard: {
        pageCode: '60110303p',
        appCode: '60110303',
        areaCode: 'dataCard'
    },
    cont_change_dataBase: {
        pageCode: '60110305p',
        appCode: '60110305',
        areaCode: 'dataBase,dataBefore,dataAfter'
    },
    cont_extend_dataBase: {
        pageCode: '60110307p',
        appCode: '60110307',
        areaCode: 'dataBase,dataBefore,dataAfter'
    },
    cont_release_card: {
        pageCode: '60110309p',
        appCode: '60110309',
        areaCode: 'dataCard'
    },
    cont_finish_card: {
        pageCode: '60110311p',
        appCode: '60110311',
        areaCode: 'dataCard'
    },
    agree_sign_postcont: {
        pageCode: '60110501p',
        appCode: '60110501',
        areaCode: 'postcontCard'
    },
    agree_sign_secrerycont: {
        pageCode: '60110501p',
        appCode: '60110501',
        areaCode: 'secrerycontCard'
    },
    agree_sign_traincont: {
        pageCode: '60110501p',
        appCode: '60110501',
        areaCode: 'traincontCard'
    },
    agree_change_postcont: {
        pageCode: '60110503p',
        appCode: '60110503',
        areaCode: 'agreementCard,postcontCardBefore,postcontCardAfter'
    },
    agree_change_secrerycont: {
        pageCode: '60110503p',
        appCode: '60110503',
        areaCode: 'agreementCard,secrerycontCardBefore,secrerycontCardAfter'
    },
    agree_change_traincont: {
        pageCode: '60110503p',
        appCode: '60110503',
        areaCode: 'agreementCard,traincontCardBefore,traincontCardAfter'
    },
    agree_release_postcont: {
        pageCode: '60110505p',
        appCode: '60110505',
        areaCode: 'postcontCard'
    },
    agree_release_secrerycont: {
        pageCode: '60110505p',
        appCode: '60110505',
        areaCode: 'secrerycontCard'
    },
    agree_release_traincont: {
        pageCode: '60110505p',
        appCode: '60110505',
        areaCode: 'traincontCard'
    },
    agree_finish_postcont: {
        pageCode: '60110507p',
        appCode: '60110507',
        areaCode: 'postcontCard'
    },
    agree_finish_secrerycont: {
        pageCode: '60110507p',
        appCode: '60110507',
        areaCode: 'secrerycontCard'
    },
    agree_finish_traincont: {
        pageCode: '60110507p',
        appCode: '60110507',
        areaCode: 'traincontCard'
    }
};

export const formToWeb = {
    cont_change_dataBase: ['cont_change_dataBefore', 'cont_change_dataAfter'],
    cont_extend_dataBase: ['cont_extend_dataBefore', 'cont_extend_dataAfter']
};

// 加载业务处理模板用
export const templateArr = [
    {//合同签订
        config: {
            pagecode: '60110303p',
            appcode: '60110303'
        },
        templateId: 'dataCard',
        newId: transactionFormId.contSign
    },
    {//合同变更
        config: {
            pagecode: '60110305p',
            appcode: '60110305'
        },
        templateId: ['dataBase', 'dataBefore', 'dataAfter'],
        newId: transactionFormId.contChange
    },
    {//合同续签
        config: {
            pagecode: '60110307p',
            appcode: '60110307'
        },
        templateId: ['dataBase', 'dataBefore', 'dataAfter'],
        newId: transactionFormId.contExtend
    },
    {//合同解除
        config: {
            pagecode: '60110309p',
            appcode: '60110309'
        },
        templateId: 'dataCard',
        newId: transactionFormId.contRelease,
    },
    {//合同终止
        config: {
            pagecode: '60110311p',
            appcode: '60110311'
        },
        templateId: 'dataCard',
        newId: transactionFormId.contFinish,
    }
];